package com.atguigu;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import java.io.Serializable;

/**
 * 分页查询包装类
 *
 * @author yxy
 * @create 2020/9/3 0003
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(description = "通用分页信息")
public class PageEntity<T> implements Serializable {
    private static final long serialVersionUID = 6911873155210956319L;

    /** 查询实体 */
    @ApiModelProperty(value = "查询实体")
    @Valid
    T entity;

    /** 当前页 */
    @ApiModelProperty(value = "当前页", required = true)
    Integer pageNo = 1;

    /** 分页条数 */
    @ApiModelProperty(value = "分页条数", required = true)
    Integer pageSize = 20;


}
